﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Oxite.Data;

namespace NotMyself.Oxite.Model
{
    public class Post : EntityBase, IPost, IFeedItem 
    {
        public Post()
        {
            Tags = new List<ITag>();
        }

        public virtual IPost Parent { get; private set; }
        public virtual Guid CreatorUserID { get; set; }
        public virtual IUser CreatorUser { get; private set; }
        public virtual string Title { get; set; }
        public virtual string Body { get; set; }
        public virtual string BodyShort { get; set; }
        public virtual byte State { get; set; }
        public virtual string Slug { get; set; }
        public virtual DateTime? Published { get; set; }
        public string CreatorName
        {
            get { return CreatorUser.DisplayName; }
        }

        public virtual string SearchBody { get; private set; }
        public virtual IArea Area { get; private set; }
        public virtual IEnumerable<ITag> Tags { get; private set; }
    }
}
